#ifndef COMPANYDIALOG_H
#define COMPANYDIALOG_H

#include <QDialog>
#include <QScrollArea>
namespace model {
class CompanyInfo;
}

namespace Ui {
class CompanyDialog;
}

class CompanyDialog : public QDialog
{
    Q_OBJECT

public:
    explicit CompanyDialog(QWidget *parent = nullptr);
    ~CompanyDialog();

    void set(const model::CompanyInfo& companyInfo);

private slots:
    void on_btn_close_clicked();

private:
    void init();
    void initPanel();
    void initBody();
    void initStyleSheet();
    void initTopK();
private:
    QWidget *_container = nullptr;
    QScrollArea *_scrollArea = nullptr;

    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    bool _isDraging = false;
    QPoint _dragPosition;

private:
    Ui::CompanyDialog *ui;
};

#endif // COMPANYDIALOG_H
